{% extends 'extends/base_all_.html' %}

{% block content %}
<div class="container vh-100">
    <div class="row h-100 align-items-center justify-content-center">
        <div class="col-md-6 text-center">
            <div class="card shadow-sm">
                <div class="card-body p-5">
                    <div class="mb-4">
                        <i class="bi bi-exclamation-triangle-fill text-danger display-3"></i>
                    </div>

                    <div class="mb-3">
                        <h1 class="display-5 fw-bold text-danger">
                        {{ error_title }}
                        </h1>
                    </div>

                    <div class="mb-4">
                        <p class="lead text-muted">
                        <b>
                            {{ error_content }}
                        </b>
                        </p>
                    </div>

                    <div class="d-grid gap-2 d-sm-flex justify-content-sm-center">
                        <button class="btn btn-outline-secondary btn-lg px-4">
                            <i class="bi bi-arrow-left me-2"></i>返回上一页
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    document.addEventListener('DOMContentLoaded', function() {
        document.querySelector('.btn-outline-secondary').addEventListener('click', function() {
            if (window.history.length > 1) {
                window.history.back();
            } else {
                window.location.href = '/';
            }
        });
    });
</script>
{% endblock %}